package com.p2p.base.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.p2p.base.dao.UserDao;
import com.p2p.base.model.BaseUser;
import com.p2p.base.service.UserService;

@Service
public class UserServiceImpl implements UserService{
	
	@Resource
	private UserDao userDao;
	
	public void addUser(BaseUser user){
		userDao.saveUser(user);
	}

	public BaseUser findByName(String name) {
		return userDao.findByName(name);
	}

	@Override
	public BaseUser findById(String uid) {
		return userDao.findById(uid);
	}

	@Override
	public BaseUser findByLoginName(String loginName) {
		return userDao.findByLoginName(loginName);
	}
}
